package com.mdd.admin.controller.account;

import com.mdd.admin.service.account.IAccountLogService;
import com.mdd.admin.validate.common.PageParam;
import com.mdd.admin.vo.account.AccountLogListVo;
import com.mdd.common.core.AjaxResult;
import com.mdd.common.core.PageResult;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Map;

/**
 * @author kn4im3
 * @date 2023/3/7 17:30
 */
@RestController
@RequestMapping("/api/account/log")
public class AccountLogController {

    @Resource
    private IAccountLogService iAccountLogService;

    /**
     * 余额显示列表
     *
     * @param pageParam 分页参数
     * @param params 参数
     * @return Object
     */
    @GetMapping("/list")
    public AjaxResult list(@Validated PageParam pageParam,
                           @RequestParam Map<String, String> params){
        PageResult<AccountLogListVo> list = iAccountLogService.list(pageParam, params);
        return AjaxResult.success(list);
    }
}
